package com.mine.modules.vm.entity;

import java.math.BigDecimal;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mine.common.annotation.vm.AssetsInfoAnnotation;
import com.mine.common.annotation.vm.LabelAnnotation;
import com.mine.common.annotation.vm.QueryAnnotation;
import com.mine.modules.vm.common.converter.AmountConverter;
import com.mine.modules.vm.common.converter.CostConverter;
import com.mine.modules.vm.common.converter.DateStringConverter;
import com.mine.modules.vm.common.converter.IdStringConverter;
import com.mine.modules.vm.common.constant.BizConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2025-04-07
 */
@Data
@ExcelIgnoreUnannotated
@TableName("vm_assets")
@ApiModel(value="VmAssets对象", description="")
public class VmAssets implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "资产编号")
    @ExcelProperty(value = "固定资产编号", index = 1, converter = IdStringConverter.class)
    @LabelAnnotation(value = "assetNumber", type = BizConstant.LABEL_ANNOTATION_TYPE_CODE)
    @QueryAnnotation(value = "asset_number", type = BizConstant.QUERY_ANNOTATION_TYPE_KEYWORDS)
    private String assetNumber;

    @ExcelProperty(value = "设备名称", index = 5)
    @ApiModelProperty(value = "资产名称")
    @LabelAnnotation(value = "assetName", type = BizConstant.LABEL_ANNOTATION_TYPE_NAME)
    @QueryAnnotation(value = "asset_name", type = BizConstant.QUERY_ANNOTATION_TYPE_KEYWORDS)
    private String assetName;

    @ExcelProperty(value = "设备分类", index = 3)
    @ApiModelProperty(value = "设备分类（A、B、C）类")
    private String deviceClassify;

    @ExcelProperty(value = "设备类别", index = 2)
    @ApiModelProperty(value = "设备类别")
    @QueryAnnotation(value = "asset_classify", type = BizConstant.QUERY_ANNOTATION_TYPE_AND)
    private String assetClassify;

    @ApiModelProperty(value = "设备标签")
    private String deviceLabel;

    @ExcelProperty(value = "数量（台/套）", index = 8, converter = AmountConverter.class)
    @ApiModelProperty(value = "数量(台/套)")
    private Integer amount;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ExcelProperty(value = "规格型号", index = 6)
    @ApiModelProperty(value = "规格型号")
    @QueryAnnotation(value = "specification", type = BizConstant.QUERY_ANNOTATION_TYPE_KEYWORDS)
    private String specification;

    @ExcelProperty(value = "工序", index = 4)
    @ApiModelProperty(value = "工序")
    @QueryAnnotation(value = "location", type = BizConstant.QUERY_ANNOTATION_TYPE_KEYWORDS)
    private String location;

    @ExcelProperty(value = "管理单位", index = 12)
    @ApiModelProperty(value = "管理单位")
    private String department;

    @ExcelProperty(value = "制造厂家", index = 9)
    @ApiModelProperty(value = "制造商")
    @QueryAnnotation(value = "maker", type = BizConstant.QUERY_ANNOTATION_TYPE_KEYWORDS)
    private String maker;

    @ExcelProperty(value = "出厂编号", index = 10)
    @ApiModelProperty(value = "出厂编号")
    private String factoryNumber;

    @ExcelProperty(value = "生产日期", index = 11, converter = DateStringConverter.class)
    @ApiModelProperty(value = "生产日期")
    private String productionDate;

    @ExcelProperty(value = "主机功率（kw）", index = 7)
    @ApiModelProperty(value = "主机功率（kw）")
    private String hostPower;

    @ExcelProperty(value = "能源介质", index = 14)
    @ApiModelProperty(value = "能源介质")
    private String energy;

    @ExcelProperty(value = "是否需要采集能源数据", index = 15)
    @ApiModelProperty(value = "是否需要采集能源数据(0-否1是)")
    private String isCollect;

    @ExcelProperty(value = "原值（元）", index = 16, converter = CostConverter.class)
    @ApiModelProperty(value = "资产原值")
    private BigDecimal cost;

    @ApiModelProperty(value = "资产净值")
    private BigDecimal equity;

    @ApiModelProperty(value = "场景图层id")
    @LabelAnnotation(value = "sceneLayerId", type = BizConstant.LABEL_ANNOTATION_TYPE_SCENE_LAYER_ID)
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String sceneLayerId;

    @ExcelProperty(value = "安装位置", index = 18)
    @QueryAnnotation(value = "install_position", type = BizConstant.QUERY_ANNOTATION_TYPE_AND)
    @ApiModelProperty(value = "安装位置")
    private String installPosition;

    @ExcelProperty(value = "用途", index = 13)
    @ApiModelProperty(value = "用途")
    private String purpose;

    @ExcelProperty(value = "台长", index = 19)
    @ApiModelProperty(value = "台长")
    private String foremen;

    @ExcelProperty(value = "现状评估", index = 43)
    @ApiModelProperty(value = "现状评估（0不满足1满足）")
    private String evaluation;

    @ExcelProperty(value = "存在的问题", index = 44)
    @ApiModelProperty(value = "存在问题")
    private String thereProblems;

    @ExcelProperty(value = "解决措施", index = 45)
    @ApiModelProperty(value = "解决措施")
    private String measures;

    @ExcelProperty(value = "备注", index = 46)
    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "视角")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String angleView;

    @ExcelProperty(value = "理论台效", index = 20)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_TX, tag = "理论台效", field = "tx_theory_effect")
    @ApiModelProperty(value = "台效-理论台效")
    private String txTheoryEffect;

    @ExcelProperty(value = "实际台效", index = 21)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_TX, tag = "实际台效", field = "tx_actual_effect")
    @ApiModelProperty(value = "台效-实际台效")
    private String txActualEffect;

    @ExcelProperty(value = "当前运行情况", index = 22)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_RUN, tag = "当前运行情况", field = "run_current_status")
    @ApiModelProperty(value = "设备运行-当前运行情况")
    private String runCurrentStatus;

    @ExcelProperty(value = "历史故障频率", index = 23)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_RUN, tag = "历史故障频率", field = "run_fault_frequency")
    @ApiModelProperty(value = "设备运行-历史故障频率")
    private String runFaultFrequency;

    @ExcelProperty(value = "关键参数稳定性", index = 24)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_RUN, tag = "关键参数稳定性", field = "run_key_param_stability")
    @ApiModelProperty(value = "设备运行-关键参数稳定性")
    private String runKeyParamStability;

    @ExcelProperty(value = "负载能力", index = 25)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_RUN, tag = "负载能力", field = "run_load_capacity")
    @ApiModelProperty(value = "设备运行-负载能力")
    private String runLoadCapacity;

    @ExcelProperty(value = "维护计划执行率", index = 26)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_WH, tag = "维护计划执行率", field = "wh_plan_execution_rate")
    @ApiModelProperty(value = "设备维护-维护计划执行率")
    private String whPlanExecutionRate;

    @ExcelProperty(value = "维护记录完整性", index = 27)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_WH, tag = "维护记录完整性", field = "wh_record_integrity")
    @ApiModelProperty(value = "设备维护-维护记录完整性")
    private String whRecordIntegrity;

    @ExcelProperty(value = "维护人员资质", index = 28)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_WH, tag = "维护人员资质", field = "wh_personnel_qualifications")
    @ApiModelProperty(value = "设备维护-维护人员资质")
    private String whPersonnelQualifications;

    @ExcelProperty(value = "预防性维护覆盖", index = 29)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_WH, tag = "预防性维护覆盖", field = "wh_preventive_coverage")
    @ApiModelProperty(value = "设备维护-预防性维护覆盖")
    private String whPreventiveCoverage;

    @ExcelProperty(value = "关键备件库存", index = 30)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_BP, tag = "备件库存", field = "bp_spare_part_inventory")
    @ApiModelProperty(value = "备品备件-备件库存")
    private String bpSparePartInventory;

    @ExcelProperty(value = "备件质量", index = 31)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_BP, tag = "备件质量", field = "bp_spare_part_quality")
    @ApiModelProperty(value = "备品备件-备件质量")
    private String bpSparePartQuality;

    @ExcelProperty(value = "供应链可靠性", index = 32)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_BP, tag = "供应链可靠性", field = "bp_supply_chain_reliability")
    @ApiModelProperty(value = "备品备件-供应链可靠性")
    private String bpSupplyChainReliability;

    @ExcelProperty(value = "备件更换效率", index = 33)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_BP, tag = "备件更换效率", field = "bp_change_efficiency")
    @ApiModelProperty(value = "备品备件-备件更换效率")
    private String bpChangeEfficiency;

    @ExcelProperty(value = "物理老化程度", index = 34)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_LH, tag = "物理老化程度", field = "lh_aging_degree")
    @ApiModelProperty(value = "设备老化-物理老化程度")
    private String lhAgingDegree;

    @ExcelProperty(value = "技术淘汰风险", index = 35)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_LH, tag = "技术淘汰风险", field = "lh_eliminate_risk")
    @ApiModelProperty(value = "设备老化-技术淘汰风险")
    private String lhEliminateRisk;

    @ExcelProperty(value = "剩余寿命预测", index = 36)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_LH, tag = "剩余寿命预测", field = "lh_life_prediction")
    @ApiModelProperty(value = "设备老化-剩余寿命预测")
    private String lhLifePrediction;

    @ExcelProperty(value = "环境适应性", index = 37)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_HJ, tag = "环境适应性", field = "hj_flexibility")
    @ApiModelProperty(value = "环境与安全-环境适应性")
    private String hjFlexibility;

    @ExcelProperty(value = "安全防护等级", index = 38)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_HJ, tag = "安全防护等级", field = "hj_prevention_level")
    @ApiModelProperty(value = "环境与安全-安全防护等级")
    private String hjPreventionLevel;

    @ExcelProperty(value = "安全事件历史", index = 39)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_HJ, tag = "安全事件历史", field = "hj_event_history")
    @ApiModelProperty(value = "环境与安全-安全事件历史")
    private String hjEventHistory;

    @ExcelProperty(value = "运维成本占比", index = 40)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_JJX, tag = "运维成本占比", field = "jjx_upkeep_cost_ratio")
    @ApiModelProperty(value = "经济性-运维成本占比")
    private String jjxUpkeepCostRatio;

    @ExcelProperty(value = "停机损失", index = 41)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_JJX, tag = "停机损失", field = "jjx_shutdown_losses")
    @ApiModelProperty(value = "经济性-停机损失")
    private String jjxShutdownLosses;

    @ExcelProperty(value = "技改/更新性价比", index = 42)
    @AssetsInfoAnnotation(value = BizConstant.ASSETS_INFO_TYPE_JJX, tag = "技改/更新性价比", field = "jjx_jg_xjb")
    @ApiModelProperty(value = "经济性-技改/更新性价比")
    private String jjxJgXjb;

    private String createBy;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String updateBy;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @TableField(exist = false)
    private String sid;

    @TableField(exist = false)
    private String elementSceneLayerId;

}
